package cn.exrick.xboot.vip.entity;

import java.io.Serializable;
import java.util.Date;

import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import com.baomidou.mybatisplus.annotation.TableField;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * <p>
 * 会员卡充值
 * </p>
 *
 * @author yuhaifei
 * @since 2022-10-09
 */
@Data
@TableName("vip_card_deposit")
@ApiModel(value = "会员卡充值")
public class VipCardDeposit implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     *
     */
    @JsonSerialize(using = ToStringSerializer.class)
    @TableField(value = "id")
    @ApiModelProperty(value = "")
    private Long id;

    /**
     * 会员卡id
     */
    @TableField(value = "card_id")
    @ApiModelProperty(value = "会员卡id")
    private String cardId;

    /**
     * openid
     */
    @TableField(value = "open_id")
    @ApiModelProperty(value = "openid")
    private String openId;

    /**
     * 金额
     */
    @TableField(value = "money")
    @ApiModelProperty(value = "金额")
    private Double money;

    /**
     * 状态 0 充值 1退款
     */
    @TableField(value = "type")
    @ApiModelProperty(value = "状态 0 充值 1退款")
    private Integer type;

    /**
     * 优惠金额
     */
    @TableField(value = "money_other")
    @ApiModelProperty(value = "优惠金额")
    private Double moneyOther = 0.0;

    /**
     * 创建时间
     */
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(value = "create_time")
    @ApiModelProperty(value = "创建时间")
    private Date createTime;

    /**
     * 创建人
     */
    @TableField(value = "create_user")
    @ApiModelProperty(value = "创建人")
    private String createUser;

}

